
; Regla que recomienda el modelo G62-110ss si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule G62-110ss
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core i3-330M")))
	(test (or (eq ?v1 0.0)(<= ?v1 2.13)))
	(test (or (eq ?v2 0.0)(>= ?v2 2.13)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 3)))
	(test (or (eq ?mem2 0)(>= ?mem2 3)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 320)))
	(test (or (eq ?tam2 0)(>= ?tam2 320)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 15.6)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 15.6)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "Intel")))
	(test (or (eq ?graf "n")(eq ?graf "HD Graphics")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "No")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 2.5)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 2.5)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 545)))
	(test (or (eq ?p2 0.0)(>= ?p2 545)))
	=>
	(assert (modelo_aconsejado (modelo Domestico:G62-110ss)))
)

; Regla que recomienda el modelo G61-410ss si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule G61-410ss
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Pentium T4300")))
	(test (or (eq ?v1 0.0)(<= ?v1 2.1)))
	(test (or (eq ?v2 0.0)(>= ?v2 2.1)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 4)))
	(test (or (eq ?mem2 0)(>= ?mem2 4)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 500)))
	(test (or (eq ?tam2 0)(>= ?tam2 500)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 15.6)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 15.6)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "Intel")))
	(test (or (eq ?graf "n")(eq ?graf "Accelerator 4500M")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "No")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 2.68)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 2.68)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 499)))
	(test (or (eq ?p2 0.0)(>= ?p2 499)))
	=>
	(assert (modelo_aconsejado (modelo Domestico:G61-410ss)))
)


; Regla que recomienda el modelo G61-430ss si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule G61-430ss
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core 2 Duo T6600")))
	(test (or (eq ?v1 0.0)(<= ?v1 2.2)))
	(test (or (eq ?v2 0.0)(>= ?v2 2.2)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 4)))
	(test (or (eq ?mem2 0)(>= ?mem2 4)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 500)))
	(test (or (eq ?tam2 0)(>= ?tam2 500)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 15.6)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 15.6)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "Intel")))
	(test (or (eq ?graf "n")(eq ?graf "Accelerator 4500M")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "No")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 2.68)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 2.68)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 549)))
	(test (or (eq ?p2 0.0)(>= ?p2 549)))
	=>
	(assert (modelo_aconsejado (modelo Domestico:G61-430ss)))
)
